.class public Lcom/waiqin365/lightapp/product/view/CountView;
.super Landroid/widget/LinearLayout;

# interfaces
.implements Ljava/util/Observer;


# instance fields
.field public final a:Ljava/lang/String;

.field private b:Landroid/view/View;

.field private c:Landroid/view/View;

.field private d:Landroid/view/View;

.field private e:Landroid/widget/EditText;

.field private f:Landroid/widget/TextView;

.field private g:Lcom/waiqin365/lightapp/product/view/e;

.field private h:D

.field private i:D

.field private j:Z

.field private k:D


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2

    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->h:D

    const-wide v0, 0x7fefffffffffffffL    # Double.MAX_VALUE

    iput-wide v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->i:D

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->j:Z

    const-wide/high16 v0, 0x3ff0000000000000L    # 1.0

    iput-wide v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->k:D

    invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/UUID;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->a:Ljava/lang/String;

    invoke-direct {p0}, Lcom/waiqin365/lightapp/product/view/CountView;->f()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 2

    invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->h:D

    const-wide v0, 0x7fefffffffffffffL    # Double.MAX_VALUE

    iput-wide v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->i:D

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->j:Z

    const-wide/high16 v0, 0x3ff0000000000000L    # 1.0

    iput-wide v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->k:D

    invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/UUID;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->a:Ljava/lang/String;

    invoke-direct {p0}, Lcom/waiqin365/lightapp/product/view/CountView;->f()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 2

    invoke-direct {p0, p1, p2, p3}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->h:D

    const-wide v0, 0x7fefffffffffffffL    # Double.MAX_VALUE

    iput-wide v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->i:D

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->j:Z

    const-wide/high16 v0, 0x3ff0000000000000L    # 1.0

    iput-wide v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->k:D

    invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/UUID;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->a:Ljava/lang/String;

    invoke-direct {p0}, Lcom/waiqin365/lightapp/product/view/CountView;->f()V

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/product/view/CountView;)Lcom/waiqin365/lightapp/product/view/e;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->g:Lcom/waiqin365/lightapp/product/view/e;

    return-object v0
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/product/view/CountView;Z)Z
    .locals 0

    iput-boolean p1, p0, Lcom/waiqin365/lightapp/product/view/CountView;->j:Z

    return p1
.end method

.method static synthetic b(Lcom/waiqin365/lightapp/product/view/CountView;)Z
    .locals 1

    iget-boolean v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->j:Z

    return v0
.end method

.method static synthetic c(Lcom/waiqin365/lightapp/product/view/CountView;)D
    .locals 2

    iget-wide v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->h:D

    return-wide v0
.end method

.method static synthetic d(Lcom/waiqin365/lightapp/product/view/CountView;)Landroid/view/View;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->b:Landroid/view/View;

    return-object v0
.end method

.method static synthetic e(Lcom/waiqin365/lightapp/product/view/CountView;)D
    .locals 2

    iget-wide v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->i:D

    return-wide v0
.end method

.method static synthetic f(Lcom/waiqin365/lightapp/product/view/CountView;)Landroid/view/View;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->c:Landroid/view/View;

    return-object v0
.end method

.method private f()V
    .locals 2

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/product/view/CountView;->getContext()Landroid/content/Context;

    move-result-object v0

    const v1, 0x7f030216

    invoke-static {v0, v1, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    const v0, 0x7f0c0ad6

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->b:Landroid/view/View;

    const v0, 0x7f0c0ad8

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->c:Landroid/view/View;

    const v0, 0x7f0c0ada

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->d:Landroid/view/View;

    const v0, 0x7f0c0ad7

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->e:Landroid/widget/EditText;

    const v0, 0x7f0c0ad9

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->f:Landroid/widget/TextView;

    invoke-direct {p0}, Lcom/waiqin365/lightapp/product/view/CountView;->g()V

    return-void
.end method

.method static synthetic g(Lcom/waiqin365/lightapp/product/view/CountView;)D
    .locals 2

    iget-wide v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->k:D

    return-wide v0
.end method

.method private g()V
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->e:Landroid/widget/EditText;

    new-instance v1, Lcom/waiqin365/lightapp/product/view/a;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/product/view/a;-><init>(Lcom/waiqin365/lightapp/product/view/CountView;)V

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->b:Landroid/view/View;

    new-instance v1, Lcom/waiqin365/lightapp/product/view/b;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/product/view/b;-><init>(Lcom/waiqin365/lightapp/product/view/CountView;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->c:Landroid/view/View;

    new-instance v1, Lcom/waiqin365/lightapp/product/view/c;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/product/view/c;-><init>(Lcom/waiqin365/lightapp/product/view/CountView;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->d:Landroid/view/View;

    new-instance v1, Lcom/waiqin365/lightapp/product/view/d;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/product/view/d;-><init>(Lcom/waiqin365/lightapp/product/view/CountView;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method


# virtual methods
.method public a()Landroid/widget/EditText;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->e:Landroid/widget/EditText;

    return-object v0
.end method

.method public a(Landroid/text/TextWatcher;)V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->e:Landroid/widget/EditText;

    invoke-virtual {v0, p1}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V

    return-void
.end method

.method public a(Z)V
    .locals 2

    iget-object v1, p0, Lcom/waiqin365/lightapp/product/view/CountView;->f:Landroid/widget/TextView;

    if-eqz p1, :cond_0

    const/4 v0, 0x0

    :goto_0
    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setVisibility(I)V

    return-void

    :cond_0
    const/16 v0, 0x8

    goto :goto_0
.end method

.method public a(ZZ)V
    .locals 2

    iget-object v1, p0, Lcom/waiqin365/lightapp/product/view/CountView;->d:Landroid/view/View;

    if-eqz p1, :cond_0

    const/4 v0, 0x0

    :goto_0
    invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V

    return-void

    :cond_0
    if-eqz p2, :cond_1

    const/4 v0, 0x4

    goto :goto_0

    :cond_1
    const/16 v0, 0x8

    goto :goto_0
.end method

.method public b()Landroid/widget/TextView;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->f:Landroid/widget/TextView;

    return-object v0
.end method

.method public b(Z)V
    .locals 1

    const/4 v0, 0x0

    invoke-virtual {p0, p1, v0}, Lcom/waiqin365/lightapp/product/view/CountView;->a(ZZ)V

    return-void
.end method

.method public c()Ljava/lang/Double;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->e:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/fiberhome/gaea/client/d/k;->e(Ljava/lang/String;)Ljava/lang/Double;

    move-result-object v0

    return-object v0
.end method

.method public d()V
    .locals 2

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->j:Z

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->e:Landroid/widget/EditText;

    const-string/jumbo v1, ""

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method public e()Lcom/waiqin365/base/db/offlinedata/s;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->f:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->getTag()Ljava/lang/Object;

    move-result-object v0

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->f:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/db/offlinedata/s;

    goto :goto_0
.end method

.method protected onDetachedFromWindow()V
    .locals 1

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v0

    invoke-virtual {v0, p0}, Ljava/util/Observable;->deleteObserver(Ljava/util/Observer;)V

    invoke-super {p0}, Landroid/widget/LinearLayout;->onDetachedFromWindow()V

    return-void
.end method

.method public setChangeValue(D)V
    .locals 1

    iput-wide p1, p0, Lcom/waiqin365/lightapp/product/view/CountView;->k:D

    return-void
.end method

.method public setCount(Ljava/lang/String;)V
    .locals 6

    invoke-static {p1}, Lcom/fiberhome/gaea/client/d/k;->i(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->e:Landroid/widget/EditText;

    const-string/jumbo v1, ""

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->e:Landroid/widget/EditText;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-wide/16 v4, 0x0

    invoke-static {p1, v4, v5}, Lcom/fiberhome/gaea/client/d/k;->a(Ljava/lang/String;D)D

    move-result-wide v4

    invoke-virtual {v2, v4, v5}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string/jumbo v3, ""

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {}, Lcom/waiqin365/lightapp/product/e/b;->b()I

    move-result v3

    const/4 v4, 0x0

    invoke-static {v2, v3, v4}, Lcom/waiqin365/lightapp/product/e/b;->a(Ljava/lang/String;IZ)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0
.end method

.method public setDataListener(Lcom/waiqin365/lightapp/product/view/e;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/product/view/CountView;->g:Lcom/waiqin365/lightapp/product/view/e;

    return-void
.end method

.method public setMaxCount(D)V
    .locals 1

    iput-wide p1, p0, Lcom/waiqin365/lightapp/product/view/CountView;->i:D

    return-void
.end method

.method public setMinCount(D)V
    .locals 1

    iput-wide p1, p0, Lcom/waiqin365/lightapp/product/view/CountView;->h:D

    return-void
.end method

.method public setOnFocusChangeListener(Landroid/view/View$OnFocusChangeListener;)V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->e:Landroid/widget/EditText;

    invoke-virtual {v0, p1}, Landroid/widget/EditText;->setOnFocusChangeListener(Landroid/view/View$OnFocusChangeListener;)V

    return-void
.end method

.method public setUnit(Lcom/waiqin365/base/db/offlinedata/s;)V
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->f:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/db/offlinedata/s;

    if-eqz p1, :cond_1

    invoke-virtual {p1}, Lcom/waiqin365/base/db/offlinedata/s;->e()Ljava/lang/Double;

    move-result-object v1

    if-eqz v1, :cond_1

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/waiqin365/base/db/offlinedata/s;->a()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1}, Lcom/waiqin365/base/db/offlinedata/s;->a()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->f:Landroid/widget/TextView;

    invoke-virtual {p1}, Lcom/waiqin365/base/db/offlinedata/s;->c()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->f:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/product/view/CountView;->d()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->g:Lcom/waiqin365/lightapp/product/view/e;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/product/view/CountView;->g:Lcom/waiqin365/lightapp/product/view/e;

    invoke-interface {v0, p1}, Lcom/waiqin365/lightapp/product/view/e;->a(Lcom/waiqin365/base/db/offlinedata/s;)V

    :cond_1
    return-void
.end method

.method public update(Ljava/util/Observable;Ljava/lang/Object;)V
    .locals 2

    if-eqz p2, :cond_0

    instance-of v0, p2, Lcom/waiqin365/lightapp/view/a/a;

    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/waiqin365/lightapp/product/view/CountView;->a:Ljava/lang/String;

    move-object v0, p2

    check-cast v0, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, v0, Lcom/waiqin365/lightapp/view/a/a;->a:Ljava/lang/String;

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    move-object v0, p2

    check-cast v0, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, v0, Lcom/waiqin365/lightapp/view/a/a;->b:Ljava/lang/Object;

    instance-of v0, v0, Ljava/util/List;

    if-eqz v0, :cond_0

    check-cast p2, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, p2, Lcom/waiqin365/lightapp/view/a/a;->b:Ljava/lang/Object;

    check-cast v0, Ljava/util/List;

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/util/Observable;->deleteObserver(Ljava/util/Observer;)V

    if-eqz v0, :cond_0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    if-lez v1, :cond_0

    const/4 v1, 0x0

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/product/d/e;

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/product/view/CountView;->setUnit(Lcom/waiqin365/base/db/offlinedata/s;)V

    :cond_0
    return-void
.end method
